<?php
uses ( 'etc.vendors.Securimage' );
class ChkCode extends Action{
	/* (non-PHPdoc)
	 * @see Action::exec()
	 */
	public function exec($request, $response, $ioc) {
		$img = new Securimage ();
		$img->image_width = 105;
		$img->image_height = 30;
		$img->perturbation = 0.45;
		$img->code_length = rand ( 3, 4 );
		$img->iscale = 10;
		$img->back_transparency = true;
		$img->image_bg_color = new Securimage_Color ( "#e2e2e2" );
		$img->multi_text_color = array (new Securimage_Color ( "#99cc00" ), new Securimage_Color ( "#cc3300" ), new Securimage_Color ( "#996699" ), new Securimage_Color ( "#9933ff" ), new Securimage_Color ( "#00ff66" ), new Securimage_Color ( "#3399cc" ), new Securimage_Color ( "#ff0099" ), new Securimage_Color ( "#996633" ), new Securimage_Color ( "#990099" ), new Securimage_Color ( "#0033cc" ), 
				new Securimage_Color ( "#009900" ), new Securimage_Color ( "#000099" ), new Securimage_Color ( "#cc0066" ), new Securimage_Color ( "#cc9900" ), new Securimage_Color ( "#cc0033" ), new Securimage_Color ( "#336600" ), new Securimage_Color ( "#33cccc" ), new Securimage_Color ( "#003300" ), new Securimage_Color ( "#00cc99" ), new Securimage_Color ( "#660033" ) );
		
		$img->use_multi_text = true;
		$img->text_angle_minimum = - 45;
		$img->text_angle_maximum = 45;
		$img->use_transparent_text = true;
		$img->text_transparency_percentage = 0; // 100 = completely transparent
		$img->num_lines = 0;
		$img->show ();
		return false;
		
	}
}